package com.tomcov.client.view;

import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.HtmlEditor;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;

public class NewMessageViewImpl extends Composite implements NewMessageView {

	@SuppressWarnings("unused")
	private Presenter presenter;
	private static final MyUiBinder binder = GWT.create(MyUiBinder.class);
	interface MyUiBinder extends UiBinder<FlowPanel, NewMessageViewImpl> {
	}
	
	@UiField HtmlEditor textarea;
	@UiField FormPanel areacontainer;
	@UiField TextField<String> to;
	@UiField Button sendbutton;
	
	public NewMessageViewImpl(){
		
		initWidget(binder.createAndBindUi(this));
		textarea.setWidth(1000);
		//textarea.setWidth("500px");
	}

	@Override
	public void setPresenter(Presenter presenter) {
		this.presenter=presenter;
	}
	
	public String To(){
		return to.getValue();
	}
	public String getmessagetosend(){
		return textarea.getValue();
	}
	
	public HtmlEditor gettextarea(){
		return textarea;
	}
	
	public Button getbutton(){
		return sendbutton;
	}
}
